<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateServerPlansTable extends Migration
{
    /**
     * 开服计划表
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('server_plans', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id')->comment('服务器id');
            $table->string('name')->comment('服务器名称');
            $table->integer('port')->comment('端口号');
            $table->integer('reg_id')->comment('大区id');
            $table->string('desc', 100)->comment('描述');
            $table->dateTime('open_time')->comment('对外开服时间');
            $table->tinyInteger('is_add')->default(0)->comment('加入口不开服');
            $table->string('merge_ids')->nullable()->comment('合服配置多个,隔开');
            $table->tinyInteger('status')->default(0)->comment('0等待处理,1待对外,2已完成,3失败');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('server_plans');
    }
}
